package com.greathf.hf_ywgl.pojo;

import org.jetbrains.annotations.NotNull;

import java.util.List;

public class HF_Result {

    // 返回结果 0：失败 1：成功
    @NotNull
    public String fhjg;

    // 错误代码
    public String cwdm;

    // 返回信息描述
    public String fhxxms;

    // 返回内容
    public Object data;

    public HF_Result(String fhjg, String cwdm, String fhxxms, Object data) {
        this.fhjg = fhjg;
        this.cwdm = cwdm;
        this.fhxxms = fhxxms;
        this.data = data;
    }

    public HF_Result() {

    }

    public static HF_Result success(List<HF_Result_Info> hfResultInfoList)
    {
        return new HF_Result("1","","成功", hfResultInfoList);
    }

    public static HF_Result success()
    {
        return new HF_Result("1","","成功","");
    }

    public static HF_Result error(String cwdm, String msg)
    {
        return new HF_Result("0",cwdm, msg, "");
    }

    public String getFhjg() {
        return fhjg;
    }

    public void setFhjg(String fhjg) {
        this.fhjg = fhjg;
    }

    public String getCwdm() {
        return cwdm;
    }

    public void setCwdm(String cwdm) {
        this.cwdm = cwdm;
    }

    public String getFhxxms() {
        return fhxxms;
    }

    public void setFhxxms(String fhxxms) {
        this.fhxxms = fhxxms;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}

